<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #result {
            width: 300px;
            height: 90px;
            border: 1px solid black;
            margin-top: 30px;
        }
    </style>
</head>
<body>
<input type="text" id="input"/>

<div id="result"></div>


<script>
    let input = document.getElementById("input")
    let result = document.getElementById("result")

    let temp = {obj: undefined}

    input.addEventListener('input', function (e) {
        console.log(e.target.value)
        temp.obj = e.target.value
    })

    Object.defineProperty(temp, "obj", {
        get() {
            return ""
        },
        set(v) {
            result.innerHTML = v
        }
    })
</script>
</body>
</html>